<template>
  <div id="dplayer"></div>
</template>

<script setup lang="ts">
import DPlayer from 'dplayer'
import { onMounted } from 'vue'

const props = defineProps<{
  url: string
}>()

onMounted(() => {
  const dp = new DPlayer({
    container: document.getElementById('dplayer'),
    video: {
      url: props.url,
    },
  })
})
</script>

<style scoped lang="scss"></style>
